<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="/layout/case/case-left-right-template.xhtml"
	xmlns:sinox="http://www.sinosoft.com.cn/sinox">

	<ui:param name="pvb" value="#{commonContentViewBean.parent}"/>
	<ui:param name="compId" value="#{commonContentViewBean.id}" />

	<ui:define name="compLeft">
		
		<script language="javaScript">
			var disposeidea = '#{commonContentViewBean.allView[0].disposeidea}';
			if(disposeidea == 'null'){
				disposeidea = '';
			}
			function formcomplete(){
				var formss = window.document.getElementsByName('#{commonContentViewBean.allView[0].id}_form');
				disposeidea = window.document.getElementById(formss[0].id+':disposeidea_name').value;
			}
		</script>
		
		<ui:decorate template="/layout/case/case-all-template.xhtml">
			<ui:param name="compViewBean" value="#{commonContentViewBean.allView[0]}" />
			<ui:param name="compId" value="#{compViewBean.id}" />
			<ui:param name="heanderTitle" value="处警登记" />

			<ui:define name="compButtons">
				<c:choose>
					<c:when test="#{commonContentViewBean.allView[0].casestate eq 'id_c_ajzt.c.0'}">
						<p:commandButton
							actionListener="#{emergencymanageManage.editJcdj}" title="保存"
							onstart="return SinoPortal.Validation.validateForm('#{compId}_form')"
							update="#{pvb.id}_0_form"
							image="./img/icons/add.png" value="保存" style="margin:5px;"
							>
							<h:inputHidden value="#{compViewBean.id}" />
						</p:commandButton>
						
						<p:commandButton
							actionListener="#{emergencymanageManage.updateJCStatus}" title="提交"
							onstart="return SinoPortal.Validation.validateForm('#{compId}_form')"
							update="#{pvb.id}_0_form"
							image="./img/icons/add.png" value="提交" style="margin:5px;"
							>
							<h:inputHidden value="#{compViewBean.id}" />
						</p:commandButton>
					</c:when>
					<c:when test="#{commonContentViewBean.allView[0].casestate eq 'id_c_ajzt.c.1'}">
						<p:commandButton
							actionListener="#{emergencymanageManage.updateCjdj}" title="保存"
							onstart="SinoPortal.Validation.validateFormForDocument('#{compId}_form')"
							image="./img/icons/add.png" value="保存"
							oncomplete="formcomplete();"
							update="#{pvb.id}_0_form,tab_case_liuzhuan"
							styleClass="portal-toolbar-button">
							<h:inputHidden value="#{compViewBean.id}" />
						</p:commandButton>
					</c:when>
					<c:otherwise>
						
					</c:otherwise>
				</c:choose>
				
				<p:commandButton title="重置" image="ui-icon-disk" value="重置" />
			</ui:define>

			<!-- 接警 -->
			<ui:define name="compAllContents">
				<p:tabView dynamic="true" cache="true" style="overflow: auto; height:90%; width:98%;border:0;">
					<p:tab title="案件信息" style="width:100px;">
						<c:choose>
							<c:when test="#{commonContentViewBean.allView[0].casestate eq 'id_c_ajzt.c.0'}">
								<ui:decorate template="/layout/input/editable-template.xhtml">
					
									<!-- 第一行 -->
									<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
										<ui:param name="compType" value="normal" />
										<ui:param name="compBean1Id" value="reporttime" />
										<ui:param name="compBean2Id" value="reportmode" />
										<ui:param name="compBean1Lable" value="接警时间" />
										<ui:param name="compBean2Lable" value="报警形式" />
										<ui:param name="compBean1Required" value="true" />
										
										<ui:define name="compBean1Content">
											<p:calendar id="reporttime" size="33" mode="popup" showOn="button" 
												value="#{compViewBean.reporttime}"
												pattern="yyyy年MM月d日 HH:mm:ss" locale="zh" popupIconOnly="true" />
										</ui:define>
										
										<ui:define name="compBean2Content">
											<sinox:codeSetInputTree id="reportmode" codeSetId="id_c_jjxs" value="#{compViewBean.reportmode}" formId="#{compViewBean.id}_form"/>
									    </ui:define>
									</ui:decorate>
									
									<!-- 第二行 -->
									<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
										<ui:param name="compType" value="normal" />
										<ui:param name="compBean1Id" value="receivedep" />
										<ui:param name="compBean1Lable" value="接报单位" />
										
										<ui:define name="compBean1Content">
											<h:inputText id="receivedep" readonly="true" value="#{compViewBean.receivedep}" />
										</ui:define>
									</ui:decorate>
									
									<!-- 第三行 -->
									<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
										<ui:param name="compType" value="normal" />
										<ui:param name="compBean1Id" value="receivepsn" />
										<ui:param name="compBean1Lable" value="接 警 人" />
										
										<ui:define name="compBean1Content">
											<h:inputText id="receivepsn" readonly="true" value="#{compViewBean.receivepsn}" />
										</ui:define>
									</ui:decorate>
									
									<!-- 第四行 -->
									<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
										<ui:param name="compType" value="normal" />
										<ui:param name="compBean1Id" value="casename" />
										<ui:param name="compBean1Lable" value="案事件名称" />
										
										<ui:define name="compBean1Content">
											<h:inputText id="casename" value="#{compViewBean.casename}" />
										</ui:define>
									</ui:decorate>
									
									<!-- 第五行 -->
									<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
										<ui:param name="compType" value="single-all" />
										<ui:param name="compBean1Id" value="bjnr" />
										<ui:param name="compBean1Lable" value="报案人陈述简要情况" />
										
										<ui:define name="compBean1Content">
											<h:inputTextarea style="width:100%;height:100px;overflow:auto;"
											id="bjnr" effectDuration="400"
											value="#{compViewBean.bjnr}" />
										</ui:define>
									</ui:decorate>
										
								</ui:decorate>
							</c:when>
							<c:when test="#{commonContentViewBean.allView[0].casestate eq 'id_c_ajzt.c.1'}">
								<ui:decorate template="/layout/case/case-fieldset-template.xhtml">
									<ui:param name="compToggleable" value="true" />
									<ui:param name="collapsed" value="true" />
									<ui:param name="compTitle" value="接警情况" />
									<ui:param name="compId" value="#{compViewBean.id}_field_01" />
		
									<ui:define name="compContent">
										<table border="0" style="width: 100%;">
											<tr>
												<td colspan="4"></td>
											</tr>
											<tr>
												<th align="right" style="width: 15%;">接警时间</th>
												<td align="left" style="width: 35%;">
													<h:inputText
														id="#{compId}_reportime" value="#{compViewBean.reporttime}"
														locale="zh"
														readonly="true">
													</h:inputText>
												</td>
												<th align="right" style="width: 15%;">报警形式</th>
												<td align="left" style="width: 35%;">
													<h:selectOneMenu id="#{compId}_reportmode" readonly="true" value="#{compViewBean.reportmode}">
														<f:selectItems value="#{compViewBean.jjxs}" />
													</h:selectOneMenu>
												</td>
											</tr>
											<tr>
												<th align="right" style="width: 15%;">接报单位</th>
												<td colspan="3">
													<h:inputText id="#{compId}_receivedep"
														style="width:70%;" readonly="true"
														value="#{compViewBean.receivedep}" />
												</td>
											</tr>
											<tr>
												<th align="right" style="width: 15%;">接 警 人</th>
												<td colspan="3">
													<h:inputText id="#{compId}_receivepsn"
														style="width:40%;" readonly="true"
														value="#{compViewBean.receivepsn}" />
												</td>
		
											</tr>
											<tr>
												<th align="left" colspan="4" style="width: 25%;">报案人陈述简要情况</th>
											</tr>
											<tr>
												<td colspan="4">
													<h:inputTextarea
														style="width:100%;height:100px;overflow:auto;"
														id="#{compId}_bjnr" effectDuration="400"
														value="#{compViewBean.bjnr}" readonly="true" />
												</td>
											</tr>
										</table>
		
									</ui:define>
								</ui:decorate>
		
								<!-- 处警 -->
								<ui:decorate template="/layout/case/case-fieldset-template.xhtml">
									<ui:param name="compToggleable" value="true" />
									<ui:param name="collapsed" value="false" />
									<ui:param name="compTitle" value="处警情况" />
									<ui:param name="compId" value="#{compViewBean.id}_field_02" />
		
									<ui:define name="compContent">
										<table border="0" cellpadding="2">
											<tr>
												<th align="right">到达现场时间</th>
												<td colspan="7"> 
													<p:calendar id="#{compId}_arrivetime" size="33" mode="popup" showOn="button" 
														value="#{compViewBean.arrivetime}"
														pattern="yyyy年MM月d日 HH:mm:ss" locale="zh" popupIconOnly="true" />
												</td>
											</tr>
		
											<tr>
												<td align="right" style="width: 12%;">出动警力数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_policenum" value="#{compViewBean.policenum}" />人
												</td>
												<td align="right" style="width: 9.5%;">出动协警数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_policeassnum"
													value="#{compViewBean.policeassnum}" />人
												</td>
												<td align="right" style="width: 8%;">出动车辆数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_voiturenum" value="#{compViewBean.voiturenum}" />辆
												</td>
												<td align="right" style="width: 12%;">出动船只数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_boatnum" value="#{compViewBean.boatnum}" />只
												</td>
											</tr>
		
											<tr>
												<td align="right" style="width: 12%;">救助伤员数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_salvationwou"
													value="#{compViewBean.salvationwou}" />人
												</td>
												<td align="right" style="width: 9.5%;">救助群众数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_salvationpeo"
													value="#{compViewBean.salvationpeo}" />人
												</td>
												<td align="right" style="width: 8%;">解救人质数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_rescuehnum" value="#{compViewBean.rescuehnum}" />人
												</td>
												<td align="right" style="width: 12%;">解救被拐卖妇女数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_rescuewnum" value="#{compViewBean.rescuewnum}" />人
												</td>
											</tr>
		
											<tr>
												<td align="right" style="width: 12%;">解救被拐卖儿童数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_rescueynum" value="#{compViewBean.rescueynum}" />人
												</td>
												<td align="right" style="width: 9.5%;">留置审查人数</td>
												<td style="width: 4%;">
													<h:inputText style="width:28px;"
													styleClass="{digits:true,maxlength:6}"
													id="#{compId}_censornum" value="#{compViewBean.censornum}" />人
												</td>
		
												<td align="right" colspan="2"></td>
												<td align="right"></td>
												<td></td>
											</tr>
		
											<tr>
												<th align="right" colspan="8">
												<p align="left">处警情况</p>
												</th>
											</tr>
		
											<tr>
												<td align="right" colspan="8">
													<h:panelGroup>
														<h:inputTextarea
															style="width:98%;height:100px;overflow:auto;"
															styleClass="{required:true}"
															id="#{compId}_disposedetails" effectDuration="400"
															value="#{compViewBean.disposedetails}"
															/>
													</h:panelGroup>
													</td>
											</tr>
		
											<tr>
												<th align="right">处警人</th>
												<td align="left" colspan="3"><!-- disposepsn --> 
													<h:panelGroup>
														<h:inputText id="#{compId}_disposepsn" readonly="true" value="#{compViewBean.disposepsn}" />
													</h:panelGroup>
												</td>
												<th align="right">处警意见</th>
												<td align="left" colspan="3"><!-- disposeidea --> 
													<sinox:codeSetInputTree id="disposeidea" styleClass="{required:true}" codeSetId="id_c_ajzt" value="#{compViewBean.disposeidea}" formId="#{compViewBean.id}_form"/>
												</td>
											</tr>
										</table>
									</ui:define>
								</ui:decorate>
		
								<!-- 案件情况 -->
								<ui:decorate template="/layout/case/case-fieldset-template.xhtml">
									<ui:param name="compToggleable" value="true" />
									<ui:param name="collapsed" value="false" />
									<ui:param name="compTitle" value="案件情况" />
									<ui:param name="compId" value="#{compViewBean.id}_field_03" />
		
									<ui:define name="compContent">
										<table border="0" cellpadding="2">
											<tr>
												<td align="right" style="width: 15%;">案事件名称</td>
												<td colspan="6">
													<h:inputText size="37"
													id="#{compId}_casename" value="#{compViewBean.casename}" />
												</td>
		
											</tr>
											<tr>
												<td align="right" style="width: 15%;">发现时间</td>
												<td colspan="6">
													<p:calendar id="#{compId}_discovertimestart" size="33" mode="popup" showOn="button" 
														value="#{compViewBean.discovertimestart}"
														pattern="yyyy年MM月d日 HH:mm:ss" locale="zh" popupIconOnly="true" />
													至 
													<p:calendar id="#{compId}_discovertimeend" size="33" mode="popup" showOn="button" 
														value="#{compViewBean.discovertimeend}"
														pattern="yyyy年MM月d日 HH:mm:ss" locale="zh" popupIconOnly="true" />
												</td>
											</tr>
											<tr>
												<td align="right" style="width: 15%;">发案时间</td>
												<td colspan="6">
												<p:calendar id="#{compId}_casetimestart" size="33" mode="popup" showOn="button" 
														value="#{compViewBean.casetimestart}"
														pattern="yyyy年MM月d日 HH:mm:ss" locale="zh" popupIconOnly="true" />
													至
													<p:calendar id="#{compId}_casetimeend" size="33" mode="popup" showOn="button" 
														value="#{compViewBean.casetimeend}"
														pattern="yyyy年MM月d日 HH:mm:ss" locale="zh" popupIconOnly="true" />
												</td>
											</tr>
		
											<tr>
												<td align="right" style="width: 15%;">选择时机</td>
												<td colspan="2">
													<!-- chooseoccasion1 --> 
													<sinox:codeSetInputTree id="chooseoccasion1" codeSetId="id_c_xzsj" value="#{compViewBean.chooseoccasion1}" formId="#{compViewBean.id}_form"/>
													<!-- chooseoccasion2 --> 
													<sinox:codeSetInputTree id="chooseoccasion2" codeSetId="id_c_xzsj" value="#{compViewBean.chooseoccasion2}" formId="#{compViewBean.id}_form"/>
													<!-- chooseoccasion3 --> 
													<sinox:codeSetInputTree id="chooseoccasion3" codeSetId="id_c_xzsj" value="#{compViewBean.chooseoccasion3}" formId="#{compViewBean.id}_form"/>
												</td>
												
												<td align="right" style="width: 15%;">案件类别</td>
												<td colspan="1">
												<sinox:codeSetInputTree id="casesort1" codeSetId="id_c_ajlb" value="#{compViewBean.casesort1}" formId="#{compViewBean.id}_form"/>
												
												<sinox:codeSetInputTree id="casesort2" codeSetId="id_c_ajlb" value="#{compViewBean.casesort2}" formId="#{compViewBean.id}_form"/>
												
												<sinox:codeSetInputTree id="casesort3" codeSetId="id_c_ajlb" value="#{compViewBean.casesort3}" formId="#{compViewBean.id}_form"/>
												
												<!-- casesort1  
												<h:selectOneMenu
													value="#{compViewBean.casesort1}">
													<f:selectItem itemLabel="请选择" itemValue="0" />
													<f:selectItems value="#{compViewBean.ajlb}" />
												</h:selectOneMenu> 
												 casesort2 <h:selectOneMenu
													value="#{compViewBean.casesort2}">
													<f:selectItem itemLabel="请选择" itemValue="0" />
													<f:selectItems value="#{compViewBean.ajlb}" />
												</h:selectOneMenu> 
											     casesort3  <h:selectOneMenu
													value="#{compViewBean.casesort3}">
													<f:selectItem itemLabel="请选择" itemValue="0" />
													<f:selectItems value="#{compViewBean.ajlb}" />
												</h:selectOneMenu>
												-->
												</td>
											</tr>
		
		
											<tr>
												<td align="right" style="width: 15%;">发案区划</td>
												<td colspan="2" style="width: 35%;">
													<!-- districtcode --> 
													<sinox:codeSetInputTree id="districtcode" codeSetId="id_c_xzqh" value="#{compViewBean.districtcode}" formId="#{compViewBean.id}_form"/>
												</td>
												<td align="right" style="width: 15%;">发案社区</td>
												<td colspan="3" style="width: 35%;">
													<!-- community --> 
													<sinox:codeSetInputTree id="community" codeSetId="id_c_sq" value="#{compViewBean.community}" formId="#{compViewBean.id}_form"/>
												</td>
											</tr>
		
											<tr>
												<td align="right" style="width: 15%;">发案地点</td>
												<td colspan="2" style="width: 35%;"><h:inputText
													size="20" id="#{compId}_caseaddress"
													value="#{compViewBean.caseaddress}" /></td>
												<td align="right" style="width: 15%;">案件性质</td>
												<td colspan="3" style="width: 35%;">
													<!-- casekind --> 
													<sinox:codeSetInputTree id="casekind" codeSetId="id_c_ajxz" value="#{compViewBean.casekind}" formId="#{compViewBean.id}_form"/>
												</td>
		
											</tr>
		
		
		
											<tr>
												<td align="right" style="width: 15%;">发案单位</td>
												<td colspan="2" style="width: 35%;">
													<h:inputText
														size="20" id="#{compId}_caseunit"
														value="#{compViewBean.caseunit}" /></td>
												<td align="right" style="width: 15%;">单位性质</td>
												<td colspan="3" style="width: 35%;">
													<h:inputText size="25"
														id="#{compId}_unitkind" value="#{compViewBean.unitkind}" />
												</td>
											</tr>
		
											<tr>
												<td align="right" style="width: 15%;">损失总价值</td>
												<td align="left" style="width: 15%;"><h:inputText
													styleClass="{number:true,maxlength:6}"
													size="7" id="#{compId}_lossvalue"
													value="#{compViewBean.lossvalue}" /> 元</td>
		
												<td align="right" style="width: 15%;">受伤人数</td>
		
												<td align="left" style="width: 15%;"><h:inputText
													size="3" id="#{compId}_lnjurenum"
													styleClass="{digits:true,maxlength:5}"
													value="#{compViewBean.lnjurenum}" /> 人</td>
		
												<td align="right" style="width: 20%;">死亡人数</td>
												<td align="left" style="width: 15%;"><h:inputText
													styleClass="{digits:true,maxlength:5}"
													size="3" id="#{compId}_dienum" value="#{compViewBean.dienum}" />人</td>
		
												<td></td>
		
												<td></td>
		
											</tr>
		
		
										</table>
									</ui:define>
								</ui:decorate>
							</c:when>
							<c:otherwise>
								<font style="color: red;">对不起！你此次登录的时间已过期，请重新登录。</font>
							</c:otherwise>
						</c:choose>
						
					</p:tab>
					
				   <p:tab title="涉案人员">  
			       		
			       </p:tab>  
				   
			       <p:tab title="涉案物品">  
			            
			       </p:tab>
				    
				   <p:tab title="涉案单位">  
		                
		           </p:tab>  
					 
				</p:tabView>

			</ui:define>
		</ui:decorate>
	</ui:define>

	<ui:define name="compRight">
		<ui:include src="/includes/model/caseother/right.xhtml" />
	</ui:define>

</ui:composition>